<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Demo3</title>
</head>
<body>
    <script>
        function CreatStudent(){
            this.name="王五"
            this.SayLove=function(){
                console.log("love you")
            }
        }
        let student = new CreatStudent();
        console.log(student.name);
        student.SayLove();
        // let student = new Object();
        // student.name="李四";
        // student.age=28;
        // student.saylove=function(){
        //     console.log("love you")
        // }
        // console.log(student.name);
        // student.saylove();
        // let student = {
        //     name: "张三",
        //     age: 18,
        //     saylove :function(){
        //         console.log("love you");
        //     }
        // }
        // console.log(student.name);
        // student.saylove();
        // function add(a,b){
        //     return a+b;
        // }
        // var arr= new Array();
        // var arr= [];
        // var arr= [1,2,"hello"];
        // console.log(arr[0]);
        // let kk= arr.pop;
        // let a = 10;
        // let b = "love";
        // a = "you";
        // b = 520;
        // alert("hello JS")
    </script>
</body>
</html>